<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>cfa: cfa_selftest_example.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.gif"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">cfa
   </div>
   <div id="projectbrief">Xilinx SDK Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('cfa__selftest__example_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">cfa_selftest_example.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains an example using the <a class="el" href="struct_x_cfa.html" title="The XCfa instance data structure. ">XCfa</a> driver to do self test on the device. </p>
<dl class="section note"><dt>Note</dt><dd></dd></dl>
<p>None</p>
<p>MODIFICATION HISTORY: </p><pre>
Ver     Who     Date    Changes
<hr/>

1.00a drg/jz    01/13/10 First Release
1.03a sg        08/14/12 Updated the example for CR 666306. Modified
                 the device ID to use the first Device Id
                 Removed the printf at the start of the main
7.0     adk     01/15/14 Implimented main and XCfaSelfTestExample
                 functions.
                 Adherence to MISRA C 2012
                 standard guidelines.
7.1   ms  01/23/17 Added xil_printf statement in main function to
                   ensure that "Successfully ran" and "Failed" strings are
                   available in all examples. This is a fix for CR-965028.
</pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a2ae73b6ff6f00ee8ff0a8600a93d0c12"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cfa__selftest__example_8c.html#a2ae73b6ff6f00ee8ff0a8600a93d0c12">CFA_DEVICE_ID</a>&#160;&#160;&#160;XPAR_CFA_0_DEVICE_ID</td></tr>
<tr class="memdesc:a2ae73b6ff6f00ee8ff0a8600a93d0c12"><td class="mdescLeft">&#160;</td><td class="mdescRight">CFA Device ID.  <a href="#a2ae73b6ff6f00ee8ff0a8600a93d0c12">More...</a><br /></td></tr>
<tr class="separator:a2ae73b6ff6f00ee8ff0a8600a93d0c12"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a9baa8f0861e4da397afb49cb31e05ecc"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cfa__selftest__example_8c.html#a9baa8f0861e4da397afb49cb31e05ecc">XCfaSelfTestExample</a> (u16 DeviceId)</td></tr>
<tr class="memdesc:a9baa8f0861e4da397afb49cb31e05ecc"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function does a minimal test on the <a class="el" href="struct_x_cfa.html" title="The XCfa instance data structure. ">XCfa</a> driver.  <a href="#a9baa8f0861e4da397afb49cb31e05ecc">More...</a><br /></td></tr>
<tr class="separator:a9baa8f0861e4da397afb49cb31e05ecc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cfa__selftest__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr class="memdesc:a840291bc02cba5474a4cb46a9b9566fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main function to call the example.  <a href="#a840291bc02cba5474a4cb46a9b9566fe">More...</a><br /></td></tr>
<tr class="separator:a840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:afffe4e100f713073b6e72da5e37cd2fb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_x_cfa.html">XCfa</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cfa__selftest__example_8c.html#afffe4e100f713073b6e72da5e37cd2fb">Cfa</a></td></tr>
<tr class="memdesc:afffe4e100f713073b6e72da5e37cd2fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Instance of the CFA Device.  <a href="#afffe4e100f713073b6e72da5e37cd2fb">More...</a><br /></td></tr>
<tr class="separator:afffe4e100f713073b6e72da5e37cd2fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a2ae73b6ff6f00ee8ff0a8600a93d0c12"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ae73b6ff6f00ee8ff0a8600a93d0c12">&#9670;&nbsp;</a></span>CFA_DEVICE_ID</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CFA_DEVICE_ID&#160;&#160;&#160;XPAR_CFA_0_DEVICE_ID</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>CFA Device ID. </p>

<p class="reference">Referenced by <a class="el" href="cfa__selftest__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main()</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a840291bc02cba5474a4cb46a9b9566fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a840291bc02cba5474a4cb46a9b9566fe">&#9670;&nbsp;</a></span>main()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Main function to call the example. </p>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS if succesful, otherwise XST_FAILURE.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p class="reference">References <a class="el" href="cfa__selftest__example_8c.html#a2ae73b6ff6f00ee8ff0a8600a93d0c12">CFA_DEVICE_ID</a>, and <a class="el" href="cfa__selftest__example_8c.html#a9baa8f0861e4da397afb49cb31e05ecc">XCfaSelfTestExample()</a>.</p>

</div>
</div>
<a id="a9baa8f0861e4da397afb49cb31e05ecc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9baa8f0861e4da397afb49cb31e05ecc">&#9670;&nbsp;</a></span>XCfaSelfTestExample()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 XCfaSelfTestExample </td>
          <td>(</td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>DeviceId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function does a minimal test on the <a class="el" href="struct_x_cfa.html" title="The XCfa instance data structure. ">XCfa</a> driver. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">DeviceId</td><td>is the XPAR_&lt;CFA_instance&gt;_DEVICE_ID value from xparameters.h.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS if succesful, otherwise XST_FAILURE.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>
<p>&lt; Default value of the Control registers Status Register and Error Register </p>

<p class="reference">References <a class="el" href="struct_x_cfa___config.html#a63b031c8d1b4b1020d0fc91be4262801">XCfa_Config::BaseAddress</a>, <a class="el" href="group__cfa__v7__0.html#gaf21a4a9fe167729fd388e53a9ae467d9">XCfa_CfgInitialize()</a>, <a class="el" href="group__cfa__v7__0.html#ga4d9258611512a367a6409eb9680b281f">XCFA_CONTROL_OFFSET</a>, <a class="el" href="group__cfa__v7__0.html#ga86f3c4570bfc5a3f9bfcae08d2c139cb">XCFA_ERROR_OFFSET</a>, <a class="el" href="group__cfa__v7__0.html#ga7aa994459d8873cad032c399620e3fd5">XCfa_LookupConfig()</a>, <a class="el" href="group__cfa__v7__0.html#ga09d781729f1b6207f4bade195c0b10f7">XCfa_ReadReg</a>, <a class="el" href="group__cfa__v7__0.html#gaa5f5c003a9010f557e2f770ebcc8e19c">XCfa_SelfTest()</a>, and <a class="el" href="group__cfa__v7__0.html#ga6a03a0f7308c710638a5d900241d4b86">XCFA_STATUS_OFFSET</a>.</p>

<p class="reference">Referenced by <a class="el" href="cfa__selftest__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main()</a>.</p>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="afffe4e100f713073b6e72da5e37cd2fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afffe4e100f713073b6e72da5e37cd2fb">&#9670;&nbsp;</a></span>Cfa</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_x_cfa.html">XCfa</a> Cfa</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Instance of the CFA Device. </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Copyright &copy; 2015 Xilinx Inc. All rights reserved.</li>
  </ul>
</div>
</body>
</html>
